﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace WpfAGVSystem.Migrations
{
    public partial class init40 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "HYWidth",
                table: "Task_Entity");

            migrationBuilder.RenameColumn(
                name: "Lot",
                table: "FullCache_Entity",
                newName: "Weight");

            migrationBuilder.RenameColumn(
                name: "Code",
                table: "FullCache_Entity",
                newName: "Model");

            migrationBuilder.AddColumn<string>(
                name: "Dimension",
                table: "Task_Entity",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Model",
                table: "Task_Entity",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "ProductionDate",
                table: "Task_Entity",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<string>(
                name: "Weight",
                table: "Task_Entity",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Batch",
                table: "FullCache_Entity",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Dimension",
                table: "FullCache_Entity",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "ProductionDate",
                table: "FullCache_Entity",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Dimension",
                table: "Task_Entity");

            migrationBuilder.DropColumn(
                name: "Model",
                table: "Task_Entity");

            migrationBuilder.DropColumn(
                name: "ProductionDate",
                table: "Task_Entity");

            migrationBuilder.DropColumn(
                name: "Weight",
                table: "Task_Entity");

            migrationBuilder.DropColumn(
                name: "Batch",
                table: "FullCache_Entity");

            migrationBuilder.DropColumn(
                name: "Dimension",
                table: "FullCache_Entity");

            migrationBuilder.DropColumn(
                name: "ProductionDate",
                table: "FullCache_Entity");

            migrationBuilder.RenameColumn(
                name: "Weight",
                table: "FullCache_Entity",
                newName: "Lot");

            migrationBuilder.RenameColumn(
                name: "Model",
                table: "FullCache_Entity",
                newName: "Code");

            migrationBuilder.AddColumn<int>(
                name: "HYWidth",
                table: "Task_Entity",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }
    }
}
